﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MovieRental.Entities;
using MovieRental.DataInterfaces;
using MovieRental.SqlRepositoryLibrary.Converters;

namespace MovieRental.SqlRepositoryLibrary
{
    public class SqlCustomerRepository : SqlRepository<CustomerInfo, Guid, CustomerConverter>, ICustomerRepository
    {
        public SqlCustomerRepository(string connectionString)
            : base(connectionString)
        {
        }

        protected override bool Contains(CustomerInfo entity)
        {
            return Contains(entity.Id);
        }

        public override void Delete(CustomerInfo entity)
        {
            Delete(entity.Id);
        }

        public bool ContainsCustomer(Guid id)
        {
            return Contains(id);
        }
    }
}
